<? if($displayHotel): ?>
		<H1>welcome back , <?=$mName?><BR></H1>
		<H3>Click to Edit hotel</H3>
		<table>
		<th>Hotel</th><th>Add room</th><th>Room type</th>
		<? 
			$temp_hotel_ID = $displayHotel[0]['hotel_id'];
			$temp_room_ID = $displayHotel[0]['rt_id'];
			$flag = false;
		?>
		<?php for($i=0; $i<count($displayHotel); $i++): ?>
				<tr>
						<td>
								<?=($i==0)? '<A HREF="http://'.$_SERVER["HTTP_HOST"].'/hotelbooking/index.php/backend/hotel/edit/'.$displayHotel[$i]["hotel_id"].'">'.$displayHotel[$i]["hotel_name"].'</A>' : '' ?>
								<? if($displayHotel[$i]['hotel_id'] != $temp_hotel_ID): ?>
										<A HREF="http://<?=$_SERVER['HTTP_HOST']?>/hotelbooking/index.php/backend/hotel/edit/<?=$displayHotel[$i]['hotel_id']?>"><?=$displayHotel[$i]['hotel_name']?></A>
										<? $temp_hotel_ID = $displayHotel[$i]['hotel_id']; ?>
										<? $flag = true; ?>
								<? endif; ?>
						</td>
						<td>
								<? if($i==0): ?>
										<A HREF="http://<?=$_SERVER['HTTP_HOST']?>/hotelbooking/index.php/backend/hotel/add/room/<?=str_replace('=', '', $this->encrypt->encode($displayHotel[$i]['hotel_id']))?>">add room</A>
								<? endif; ?>
								<? if($flag): ?>
										<A HREF="http://<?=$_SERVER['HTTP_HOST']?>/hotelbooking/index.php/backend/hotel/add/room/<?=str_replace('=', '', $this->encrypt->encode($displayHotel[$i]['hotel_id']))?>">add room</A>
										<? $flag = false; ?>
								<? endif; ?>
						</td>
						<td>
								<?=($i==0)? '<A HREF="http://'.$_SERVER["HTTP_HOST"].'/hotelbooking/index.php/backend/hotel/edit/room.'.str_replace('=', '', $this->encrypt->encode($displayHotel[$i]["rt_id"])).'">'.$displayHotel[$i]["rt_name"].'</A>' : '' ?>
								<? if($displayHotel[$i]['rt_id'] != $temp_room_ID): ?>
										<A HREF="http://<?=$_SERVER['HTTP_HOST']?>/hotelbooking/index.php/backend/hotel/edit/room.<?=str_replace('=', '', $this->encrypt->encode($displayHotel[$i]['rt_id']))?>"><?=$displayHotel[$i]['rt_name']?></A>
										<? $temp_room_ID = $displayHotel[$i]['rt_id']; ?>
								
								<? endif; ?>
						</td>
				</tr>
		<?php endfor; ?>
		</table>
		<BR><A HREF="http://<?=$_SERVER['HTTP_HOST']?>/hotelbooking/index.php/backend/<?=$role?>/">Add hotel</A>
		<BR><A HREF="http://<?=$_SERVER['HTTP_HOST']?>/hotelbooking/index.php/backend/hotel/managebook/">Manage Booking</A>
<? else: ?>
		<?=$notice?>
<? endif; ?>